<?php if (!defined('THINK_PATH')) exit(); /*a:5:{s:65:"E:\www\paobanglang\nav/../application/admin\view\sms\setting.html";i:1503796482;s:63:"E:\www\paobanglang\nav/../application/admin\view\Main\menu.html";i:1514443605;s:67:"E:\www\paobanglang\nav/../application/admin\view\Public\header.html";i:1512184095;s:70:"E:\www\paobanglang\nav/../application/admin\view\Main\menu_footer.html";i:1510984673;s:67:"E:\www\paobanglang\nav/../application/admin\view\Public\footer.html";i:1516863870;}*/ ?>
﻿<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>后台管理</title>
   
    <link rel="stylesheet" href="__STATIC__/admin/css/amazeui.min.css" />
    <link rel="stylesheet" href="__STATIC__/admin/css/admin.css">
    <link rel="stylesheet" href="__STATIC__/admin/css/style.css">
    <link rel="stylesheet" href="__STATIC__/admin/css/pintuer.css">
    <link rel="stylesheet" href="__STATIC__/admin/css/app.css">
    <script src="__STATIC__/admin/js/jquery.min.js"></script>
    <script src="__STATIC__/admin/js/amazeui.min.js"></script>
    <script src="__STATIC__/admin/js/pintuer.js"></script>
    <script src="__STATIC__/admin/js/app.js"></script>
    <script type="text/javascript" src="__STATIC__/admin/layer/layer.js"></script>
    <script type="text/javascript" src="__STATIC__/admin/laydate/laydate.js"></script>
    <script type="text/javascript" src="__STATIC__/admin/laytpl/laytpl.js"></script>
</head>
<body>
<header class="am-topbar am-topbar-inverse admin-header">
    <div class="am-topbar-brand">
        <a href="javascript:;" class="tpl-logo">
            <img src="__STATIC__/admin/images/logo.png">
        </a>
    </div>
    <div class="am-icon-list tpl-header-nav-hover-ico am-fl am-margin-right"></div>
    <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-success am-show-sm-only" data-am-collapse="{target: '#topbar-collapse'}"><span class="am-sr-only">导航切换</span> <span class="am-icon-bars"></span></button>
    <div class="am-collapse am-topbar-collapse" id="topbar-collapse">
        <ul class="am-nav am-nav-pills am-topbar-nav am-topbar-right admin-header-list tpl-header-list">
            <!--<li title="清除缓存">
                <a href="javascript:clear_cache()" class="tpl-header-list-link">
                    清除缓存
                </a>
            </li>-->
            <li title="注销登录">
                <a href="<?php echo url('admin/login/quit'); ?>" class="tpl-header-list-link">
                    <span class="am-icon-sign-out tpl-header-list-ico-out-size"></span>
                </a>
            </li>
        </ul>
    </div>
</header>
<div class="tpl-page-container tpl-page-header-fixed">
    <div class="tpl-left-nav tpl-left-nav-hover" style="margin-left: -10px">
        <div class="tpl-left-nav-title">
            导航列表
        </div>
        <div class="tpl-left-nav-list">
            <ul class="tpl-left-nav-menu">
                <?php foreach($menu_list as $menu): ?>
                    <li class="tpl-left-nav-item">
                        <?php 
                            $b = 0;
                            foreach($menu['child'] as $k => $v){
                                if (strtolower(request()->controller().'/'.request()->action()) == $v['url']){
                                    $b = 1;
                                    break;
                                }
                            }
                           //dump($menu['child']);
                         ?>
                        <a class="nav-link tpl-left-nav-link-list" <?php if($b == 1): ?> class="active" <?php endif; ?>>
                            <i class="<?php echo $menu['icon']; ?>"></i>
                            <span><?php echo $menu['name']; ?></span>
                            <?php if(count($menu['child']) > 0): ?>
                                <i class="am-icon-angle-right tpl-left-nav-more-ico am-fr am-margin-right tpl-left-nav-more-ico-rotate"></i>
                            <?php endif; ?>
                        </a>
                        <?php if(count($menu['child']) > 0): ?>
                            <ul class="tpl-left-nav-sub-menu" style="display:<?php if($b != 1): ?>none<?php else: ?>block<?php endif; ?>;">
                                <li>
                                    <?php foreach($menu['child'] as $menu_child): ?>
                                        <a href="__ROOT__/admin/<?php echo $menu_child['url']; ?>" id="<?php echo request()->controller(); ?>/<?php echo request()->action(); ?>" <?php if(strtolower(request()->controller().'/'.request()->action()) == $menu_child['url']): ?> class="active"<?php endif; ?>>
                                            <i class="am-icon-angle-right"></i>
                                            <span><?php echo $menu_child['name']; ?></span>
                                            <!--<i class="am-icon-star tpl-left-nav-content-ico am-fr am-margin-right"></i>-->
                                        </a>
                                    <?php endforeach; ?>
                                </li>
                            </ul>
                        <?php endif; ?>
                    </li>
                <?php endforeach; ?>
            </ul>
        </div>
    </div>
</div>

<style>
    .am-dropdown{
        width: 100%;
        padding-left: 30px;
        margin-bottom: 10px;
    }
    .am-dropdown div{
        color: #000;
    }
</style>
<div class="tpl-content-wrapper">
	<form method="post" class="form-x" action="?tab=upload" style="background: #fff; overflow: hidden">
		<div class="am-dropdown">
			<div class="label">
			</div>
			<div class="field">
				<div class="alert alert-yellow input-auto" size="100"><?php echo lang('sms')['tip']; ?><a target="_blank" href="https://www.alidayu.com/"><?php echo lang('currency')['click_go']; ?></a></div>
			</div>
		</div>
		<div class="am-dropdown">
			<div class="label">
				<label for="appkey">appkey</label>
			</div>
			<div class="field">
				<input type="text" class="input input-auto" id="appkey" name="appkey" value="<?php echo $data['appkey']; ?>" size="80" placeholder="<?php echo lang('currency')['required']; ?>" data-validate="required:<?php echo lang('currency')['required']; ?>" />
			</div>
		</div>
		<div class="am-dropdown">
			<div class="label">
				<label for="appsecret">appsecret</label>
			</div>
			<div class="field">
				<input type="text" class="input input-auto" id="appsecret" name="appsecret" value="<?php echo $data['appsecret']; ?>" size="80" placeholder="<?php echo lang('currency')['required']; ?>" data-validate="required:<?php echo lang('currency')['required']; ?>" />
			</div>
		</div>
		<div class="am-dropdown">
			<div class="label">
				<label for="sign">sign</label>
			</div>
			<div class="field">
				<input type="text" class="input input-auto" id="sign" name="sign" value="<?php echo $data['sign']; ?>" size="80" placeholder="<?php echo lang('currency')['required']; ?>" data-validate="required:<?php echo lang('currency')['required']; ?>" />
			</div>
		</div>
		<div class="am-dropdown">
			<div class="label">
				<label for="template"><?php echo lang('sms')['template']; ?></label>
			</div>
			<div class="field">
				<input type="text" class="input input-auto" id="template" name="template" value="<?php echo $data['template']; ?>" size="80" placeholder="<?php echo lang('currency')['required']; ?>" data-validate="required:<?php echo lang('currency')['required']; ?>" />
			</div>
		</div>
		<div class="form-button">
			<button class="button bg-main" type="submit"><?php echo lang('form')['submit']; ?></button>
			<button class="button bg-green testsend" type="button">Test Send</button>
		</div>
		<br/>
		<div id="testsend" class="am-dropdown hidden">
			<div class="label">
				<?php echo lang('label')['status']; ?>：
			</div>
			<div class="field">
				<div id="sms_return" class="alert alert-yellow input-auto" size="100"></div>
			</div>
		</div>
	</form>
<script>
	layer.config({
		extend: 'extend/layer.ext.js'
	});
	$('.testsend').click(function(){
		var index = layer.prompt({title:'<?php echo lang('label')['phone']; ?>'},function(val){
			$.getJSON("__ROOT__/admin/sms/testsend.html",{phone:val},function(data){
				$("#testsend").removeClass('hidden');
				$("#sms_return").html(data);
				layer.close(index);
			});
		});
	});
</script>
</div>
<script src="__STATIC__/admin/js/jquery.min.js"></script>
<script src="__STATIC__/admin/js/amazeui.min.js"></script>
<script src="__STATIC__/admin/js/pintuer.js"></script>
<script src="__STATIC__/admin/js/app.js"></script>
<script type="text/javascript" src="__STATIC__/admin/layer/layer.js"></script>
<script type="text/javascript" src="__STATIC__/admin/layer/extend/layer.ext.js"></script>
<script type="text/javascript" src="__STATIC__/admin/laydate/laydate.js"></script>
<script type="text/javascript" src="__STATIC__/admin/laytpl/laytpl.js"></script>
<script>
    $('.upload').on('click',function (){
            var id = $(this).attr('data-id');
            upload(id);
        }
    );
    function upload(id){
        layer.open({
            type:2,
            title:false,
            area: ['70%', '90%'],
            offset: '5%',
            content: "<?php echo url('/admin/material'); ?>?id="+id
        });
    }
</script>
<?php if(request()->isPost()): ?>
<script>
    layer.msg('操作完成！');
    setTimeout(function (){
        parent.window.location.href = parent.window.location.href;
    },800);
</script>
<?php endif; ?>
</body>
</html>